//
//  XJRetWeetView.m
//  weiboOC
//
//  Created by 徐绩 on 16/4/23.
//  Copyright © 2016年 ayumi. All rights reserved.
//

#import "XJRetWeetView.h"

@implementation XJRetWeetView

-(void)setStatusViewModel:(XJStatusViewModel *)statusViewModel{

    _statusViewModel = statusViewModel;
    self.contentLabel.text = statusViewModel.retweetText;
}

-(instancetype)initWithFrame:(CGRect)frame{

    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

-(void)setupUI{
    
    UILabel *contentLabel = [UILabel textColor:[UIColor darkGrayColor] font:retWeetLabelFont maxWidth:screenW - 2 * statusCellMargin];
    self.contentLabel = contentLabel;
    [self addSubview:contentLabel];
    
    [contentLabel makeConstraints:^(MASConstraintMaker *make) {
        
        make.leading.top.equalTo(self).offset(statusCellMargin);
    }];
    [self makeConstraints:^(MASConstraintMaker *make) {
        
        make.bottom.equalTo(contentLabel.bottom).offset(statusCellMargin);
    }];


}
@end
